<?php $tpl->addJS('jquery/jquery.js'); ?>
<?php $tpl->addJS('jquery/smartcolumns.js'); ?>
<div class="<?php echo @$id; ?> clearfix">
  <?php if (!empty($products)) { ?>
  <h2><?php echo $heading_title; ?></h2>
  <ul class="grid">
    <?php foreach ($products as $product) { ?>
    <li style="<?php echo @$style ?>">
      <div class="block ajaxadd">
	    <form id="form_<?php echo $id; ?>_<?php echo $product['product_id']; ?>" action="<?php echo $product['action']; ?>" method="post" enctype="multipart/form-data">
          <a href="<?php echo $product['href']; ?>"><img id="img_<?php echo $id; ?>_<?php echo $product['product_id']; ?>" class="thumb" src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a>
          <h3><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></h3> 
          <p><span class="reduce"><?php echo @$product['price_old']; ?></span>&nbsp;<span class="price"><?php echo $product['price']; ?></span></p>
          <?php if (@$atc) { ?>
	      <input class="AddToCart" type="image" src="<?php echo $tpl->getImage('image/button_buy_now.gif'); ?>" />
	      <input type="hidden" name="quantity" value="1" />
	      <input type="hidden" name="task" value="1" />
	      <input type="hidden" name="product_id" value="<?php echo $product['product_id']; ?>" />
	      <?php } ?>
	    </form>
	    <?php if (@$product['description']) {?><p><?php echo $product['description']; ?></p><?php } ?>
      </div>
    </li>
    <?php } ?>
  </ul>
  <?php } ?>
</div>